#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include<string>
using namespace std;

class Solution {
public:
    static string multiply(string num1, string num2)
    {
        if (num1[0] == '0' || num2[0] == '0')
            return "0";
        string result;
        for (int i = 0; i < num1.size() + num2.size(); i++)
        {
            result += '0';
        }
        for (int i = num1.size() - 1; i >= 0; i--)
        {
            int carry = 0;
            for (int j = num2.size() - 1; j >= 0; j--)
            {
                int n1 = num1[i] - '0';
                int n2 = num2[j] - '0';
                int mul = n1 * n2 + carry + (result[i + j + 1] - '0');
                result[i + j + 1] = mul % 10 + '0';
                carry = mul / 10;
            }
            result[i] += carry;
        }
        int k = 0;
        while (result[k] == '0') { k++; }
        int i = 0;
        while (k < result.size()) { result[i++] = result[k++]; }
        result.resize(i);
        return result;
    }
};

int main()
{
    string x = Solution::multiply("0", "0");
    return 0;
}